home *** CD-ROM | disk | FTP | other *** search
- This file contains hints for booting Linux from a compressed dos partition.
-
- ******************************************************************************
- * *
- * ATTENTION: This is old documentation. The method described herein *
- * still works but you should use the preferrable one in 'boot.doc'. *
- * *
- ******************************************************************************
-
- WARNING: Booting Linux from a compressed partition is *not* recommended. It
- *works*, but it's *very slow*. You need a really fast processor to
- enjoy it. Linux may lose a lot of its performance. This is because
- the CVF format is extremely unsuited for fast disk access.
-
- WARNING 2: This procedure may be dangerous because it's *very* sensitive to
- potential dmsdos bugs. One bug may kill everything on your system.
-
- WARNING 3: You should create a new compressed partition for Linux. Shrink
- your others before if necessary. Well, it *works* with everything on
- one partition, but I'd just like to feel safe in case something
- goes wrong...
-
- I suppose you are umsdos user and you have installed Linux in an umsdos root
- partition. So in principle, you must use a trick to get around some problems.
-
- *** Well, I hope you know the old hacker's wisdom: 'Never change a running
- system!'. But if you can't leave your fingers off, the first thing to do
- is to backup everything. So please backup now.
-
- When umsdos boots, it changes the root mount point to a directory /linux
- wherein you can find all the Linux stuff under Dos. The /linux directory
- itself behaves as root directory under Linux. This is called 'pseudo root
- mode'.
-
- You will have to boot umsdos not in pseudo root mode when booting from a
- compressed partition. This is not a dmsdos limitation, but a trick to
- allow safe installation of dmsdos boot. (You *can* do it in pseudo root
- mode, too, but installation is *very* difficult and dangerous - one
- mistake and Linux will refuse to boot forever - you might have to restore
- everything from a backup. Note that it's *not* enough to simply setup a set
- of links for it like the method described herein for non-pseudo root mode.)
-
- Simply do the following:
-
- Ensure there is enough space on your compressed partition where you want
- to move Linux. Don't rely on Dos' compression ratio, assume a ratio 1.7:1.
-
- Boot Linux as usual in umsdos pseudo root mode and enter the following
- copy commands to copy the Linux directories to your compressed drive.
-
- Assuming your compressed partition is in the file dblspace.001:
-
- *** BE PATIENT HERE !!! It will take a *long* time. You may suppose
- that your system has locked up, but it hasn't. In fact it's compressing
- every file. To watch the progress you can use cp -a -v instead of cp -a.
-
- (Note: I recently got mail that these commands didn't copy symbolic
- links ($#?!). I first supposed a simple mistake, but then I couldn't
- reproduce the problem. Maybe there are some buggy cp commands around...)
-
- cd /DOS
- umssync .
- cd dblspace.001
- umssync .
- cd ..
- cp -a /bin /DOS/dblspace.001
- ln -s dblspace.001/bin bin
- cp -a /etc /DOS/dblspace.001
- ln -s dblspace.001/etc etc
- cp -a /home /DOS/dblspace.001
- ln -s dblspace.001/home home
- cp -a /lib /DOS/dblspace.001
- ln -s dblspace.001/lib lib
- cp -a /root /DOS/dblspace.001
- ln -s dblspace.001/root root
- cp -a /sbin /DOS/dblspace.001
- ln -s dblspace.001/sbin sbin
- cp -a /usr /DOS/dblspace.001
- ln -s dblspace.001/usr usr
- cp -a /var /DOS/dblspace.001
- ln -s dblspace.001/var var
-
- The above commands have to be done for all directories you find in / except
- for the following: /proc, /mnt, /tmp, /dev and all mount points. These need
- the following commands:
-
- cd /DOS
- mkdir proc
- mkdir mnt
- cp -a /tmp .
- cp -a /dev .
-
- Each mount point needs also a mkdir here.
-
- Now boot dos. Rename the directory linux to linuxx. (If dos refuses to
- rename a directory, take a disk manipulation tool to do it.) This trick
- inhibits umsdos' change to pseudo root mode because it does not find the
- linux directory. (Well, do you see the trick? If there's a problem you can
- simply retore the old state by renaming the directory back to linux.)
-
- After that, almost everything is ready. Boot Linux (you can even use the
- ro option for the umsdos/dmsdos root partition when booting - this has the
- adventage that the filesystem driver performs the usual checks before
- mounting a filesystem).
-
- BE PATIENT !!! Booting Linux from a compressed partition takes a lot of
- time. Do not interrupt the boot process. You may receive some minor error
- messages because of the absence of the /DOS directory so you may
- have to modify your startup scripts. This mostly affects additional umssync
- statements (but it shouldn't lock up the boot process).
-
- When everything works, you can boot dos and remove the whole linuxx
- directory. However, if it does not work, rename linuxx back to linux so the
- original state is restored.
-
- Speed improvement: You should at least link your kernel log (/var/adm/messages)
- to a file on an uncompressed partition. It's even better to copy the whole
- /var/adm directory to an uncompressed partition and setup a link like this:
-
- cd /var
- cp -a adm /var_adm_dir
- rm -R adm
- ln -s /var_adm_dir adm
-
- You should also move your print and mail spooling directories to an
- uncompressed partition or setup links (see your mailing and printing
- documentation). It's usually the /usr/spool or /var/spool directory.
-